package com.tobeface.sns.application.blog.impl;

import java.util.Collection;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.kissme.core.orm.Page;
import com.tobeface.sns.application.blog.BlogChannelService;
import com.tobeface.sns.domain.blog.BlogChannel;
import com.tobeface.sns.infrastructure.persist.blog.BlogChannelRepository;

/**
 * @author Linxiaosheng
 */
@Service
public class BlogChannelServiceImpl implements BlogChannelService {

	@Autowired
	private BlogChannelRepository blogChannelRepository;
	
	/*
	 * (non-Javadoc)
	 * @see com.sinzv.sns.application.blog.BlogChannelService#save(com.sinzv.sns.domain.blog.BlogChannel)
	 */
	@Override
	public BlogChannel save(BlogChannel blogChannel) {
		return blogChannelRepository.save(blogChannel);
	}

	/*
	 * (non-Javadoc)
	 * @see com.sinzv.sns.application.blog.BlogChannelService#findOne(java.lang.String)
	 */
	@Override
	public BlogChannel findOne(String id) {
		return blogChannelRepository.findOne(id);
	}

	/*
	 * (non-Javadoc)
	 * @see com.sinzv.sns.application.blog.BlogChannelService#findPage(com.kissme.core.orm.Page)
	 */
	@Override
	public Page<BlogChannel> findPage(Page<BlogChannel> page) {
		return blogChannelRepository.findPage(page); 
	}

	/*
	 * (non-Javadoc)
	 * @see com.sinzv.sns.application.blog.BlogChannelService#findAll()
	 */
	@Override
	public Collection<BlogChannel> findAll() {
		return blogChannelRepository.findAll();
	}

}
